# Maintainer: Alexey Pavlov <alexpux@gmail.com>

_realname=gsettings-desktop-schemas
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=3.16.1
pkgrel=1
arch=('any')
url="https://wiki.gnome.org/"
pkgdesc="Shared GSettings schemas for the desktop (mingw-w64)"
depends=("${MINGW_PACKAGE_PREFIX}-glib2")
makedepends=("${MINGW_PACKAGE_PREFIX}-gobject-introspection" "intltool")
license=('GPL')
options=('strip' 'staticlibs')
install=schemas-${CARCH}.install
source=("https://download.gnome.org/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz")
sha256sums=('74fe9fdad510c8a6666febeceb7ebafc581ef990b3afcc8c1e8b5d90b24b3461')

prepare() {
  cd "${srcdir}/${_realname}-${pkgver}"
  autoreconf -fi
}

build()
{
  rm -rf ${srcdir}/build-${MINGW_CHOST}
  mkdir ${srcdir}/build-${MINGW_CHOST}
  cd ${srcdir}/build-${MINGW_CHOST}
  ../${_realname}-${pkgver}/configure \
      --prefix=${MINGW_PREFIX} \
      --build=${MINGW_CHOST} \
      --host=${MINGW_CHOST} \
      --target=${MINGW_CHOST} \
      --disable-schemas-compile \
      --enable-introspection

  make
}

package() {
  cd "${srcdir}/build-${MINGW_CHOST}"
  make DESTDIR="${pkgdir}" install
}
